
export default {
    getItem(key){
        return this.getStorage()[key]
    },
    setItem(key,data){
        let storage = this.getStorage();
        storage[key] = data;
        localStorage.setItem('catchadmin',JSON.stringify(storage));
    },
    getStorage(){

      return JSON.parse(localStorage.getItem('catchadmin') || '{}');
    },
    clearItem(key){
       let storage =  this.getStorage();
       delete storage[key];
       localStorage.setItem('catchadmin',JSON.stringify(storage));
    }
};